function out = resolve_(SET,dyn_in)

%%

param_names = cellstr(dyn_in.M_.param_names) ;

set_params

dyn_in.M_.params = out ;

out = [] ;

dyn_in.dyn_linearize_point = xsteady' ;
dyn_in.linearize_around_diff_y = 1 ;

%%

mats_out = dyn_to_str(dyn_in) ;

if dyn_in.solve
out.mats.Q = mats_out.mats.Q ;
out.mats.G = mats_out.mats.G ; 
out.zlb.Qf = out.mats.Q ; 
end

out.str_mats.A0 = mats_out.mats.A ;
out.str_mats.A1 = mats_out.mats.B ;
out.str_mats.B0 = mats_out.mats.D ;
out.str_mats.D0 = mats_out.mats.E ;
out.str_mats.D2 = mats_out.mats.D2 ;
out.str_mats.Gamma = mats_out.mats.Gamma ;

out.mat_i_f_zlb = out.str_mats ;

out.mat_i_f_zlb.A0(SET.tr_row,:) = 0 ;
out.mat_i_f_zlb.A1(SET.tr_row,:) = 0 ;
out.mat_i_f_zlb.D0(SET.tr_row,:) = 0 ;
out.mat_i_f_zlb.B0(SET.tr_row,:) = 0 ;
out.mat_i_f_zlb.A0(SET.tr_row,SET.pos_of_i) = 1 ;
out.mat_i_f_zlb.A0(SET.tr_row,end) = -SET.zlb_val ; % Constant

out.mat_init    = out.str_mats ; % Structural matrices not at ZLB
out.mat_fin     = out.str_mats ; % Structural matrices after ZLB  

out.zlb.mat_init    = out.mat_init ; 
out.zlb.mat_i_f_zlb = out.mat_i_f_zlb ;  